.Dd Jun 12, 2017
.Dt AUCONV 1
.Os
.Sh NAME
.Nm auconv
.Nd preform audio format conversion
.Sh SYNOPSIS
.Nm
.Op Fl b Ar buffer-size
.Op Fl c Ar channels
.Op Fl i Ar input-encoding
.Op Fl j Ar skip
.Op Fl o Ar output-encoding
.Op Fl r Ar rate
.Op Fl s Ar size
.Sh DESCRIPTION
Reads Au formatted, or raw, audio files from the standard input and
write a converted Au formatted audio file to the standard output.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl b Ar buffer-size
Override the default buffer size.
.It Fl c Ar channels
Set the number of channels in the raw input (normally 2).
.It Fl i Ar input-encoding
Set the encoding of the input (normally 16-bit PCM).
.br
This option implies a raw input encoding.
.Pp
.Bl -tag -width Ds
.It "The encoding-string can start with a" Qq raw indicator
.Qq r
or
.Qq raw
.It And can end with an endianness specifier:
.Qq eb ,
.Qq be ,
or simply
.Qq b
.El
.Pp
The encoding string is case-insensitive.
.Pp
The
.Qq raw
indicator is implied by endianness specifiers.
.It Fl j Ar skip
Start reading the raw input after
.Ar skip
bytes.
.It Fl o Ar output-encoding
Set the output encoding (normally 16-bit PCM).
.Pp
See above for the encoding-string format.
.It Fl r Ar rate
Set the sample-rate of the raw input (normally 48000).
.It Fl s Ar size
Read
.Ar size
bytes as raw audio data before resuming normal operation.
.El
.Sh EXAMPLES
Convert raw little-endian PCM-16 input to an Au formatted stream:
.Dl ... | auconv -ipcm16l | ...
.Pp
Create an Au formatted noise file:
.Dl auconv -c1 < /dev/random | head -c96000 > noise-1s.au
.Pp
Create an empty Au formatted audio file:
.Dl auconv -s0 < /dev/null > empty.au
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr au 7
.Xr auresample 1
.Xr audioconvert 1
